/*
 * Main.java
 *
 * Created on 2 de mayo de 2007, 8:25
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package sistemarrhh;
import Usuario.JP_AccesoUsuario;
import delegate.Listas;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import org.jvnet.substance.*;
import java.io.*;
import utiles.Utiles_Panel;
//import org.jvnet.substance.theme.*;

/**
 *
 * @author admin
 */
public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    static void cambiatema(int num)throws Exception{
       
        switch(num){
            case 1:UIManager.setLookAndFeel("org.fife.plaf.Office2003.Office2003LookAndFeel");
                    break;
            case 2:UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                    break;
            case 3:UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");    
                    break;
            case 4:UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
                    break;
            case 5:net.sourceforge.napkinlaf.NapkinLookAndFeel algggg=new net.sourceforge.napkinlaf.NapkinLookAndFeel();
                    LookAndFeel abcde=algggg;
                    UIManager.setLookAndFeel(abcde);
                    break;
            case 6:com.nilo.plaf.nimrod.NimRODLookAndFeel nimrr=new com.nilo.plaf.nimrod.NimRODLookAndFeel();
                    UIManager.setLookAndFeel(nimrr);
                    break;
            case 7:com.nilo.plaf.nimrod.NimRODTheme them=new com.nilo.plaf.nimrod.NimRODTheme();
           
                    them.setPrimary1(new java.awt.Color(76,77,79));
                    them.setPrimary2(new java.awt.Color(117,164,208));
                    them.setPrimary3(new java.awt.Color(217,217,217));
                    them.setMenuOpacity(5);
                    them.setBlack(new java.awt.Color(0,0,0));
            
                    them.setSecondary1(new java.awt.Color(0,0,0));
                    them.setSecondary2(new java.awt.Color(156,159,162));
                    them.setSecondary3(new java.awt.Color(235,244,250));
                    them.setWhite(new java.awt.Color(255,255,255));
                    them.setOpacity(5);
                    com.nilo.plaf.nimrod.NimRODLookAndFeel nimrr1=new com.nilo.plaf.nimrod.NimRODLookAndFeel();
                    nimrr1.setCurrentTheme(them);
                    UIManager.setLookAndFeel(nimrr1);
                    break;
            case 8:com.l2fprod.gui.plaf.skin.Skin ski=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/underlingthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 9:com.l2fprod.gui.plaf.skin.Skin ski1=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/BeOSthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski1);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());    
                    break;
            case 10:com.l2fprod.gui.plaf.skin.Skin ski2=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/blueMetalthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski2);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 11:com.l2fprod.gui.plaf.skin.Skin ski3=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/chaNinja-Bluethemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski3);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 12:com.l2fprod.gui.plaf.skin.Skin ski4=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/coronaHthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski4);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 13:com.l2fprod.gui.plaf.skin.Skin ski5=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/cougarthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski5);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 14:com.l2fprod.gui.plaf.skin.Skin ski6=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/crystal2themepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski6);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 15:com.l2fprod.gui.plaf.skin.Skin ski7=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/hmmXPMonoBluethemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski7);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 16:com.l2fprod.gui.plaf.skin.Skin ski8=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/iBarthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski8);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 17:com.l2fprod.gui.plaf.skin.Skin ski9=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/midnightthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski9);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 18:com.l2fprod.gui.plaf.skin.Skin ski10=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/opusLunaSilverthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski10);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 19:com.l2fprod.gui.plaf.skin.Skin ski11=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/opusOSBluethemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski11);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 20:com.l2fprod.gui.plaf.skin.Skin ski12=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/opusOSOlivethemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski12);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 21:com.l2fprod.gui.plaf.skin.Skin ski13=com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("temas/royalInspiratthemepack.zip");
                    com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(ski13);
                    UIManager.setLookAndFeel(new com.l2fprod.gui.plaf.skin.SkinLookAndFeel());
                    break;
            case 22:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceAutumnLookAndFeel());
                    break;
            case 23:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel());
                    break;
            case 24:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel());
                    break;
            case 25:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceBusinessLookAndFeel());
                    break;
            case 26:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceCremeLookAndFeel());
                    break;
            case 27:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceEmeraldDuskLookAndFeel());
                    break;
            case 28:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceFieldOfWheatLookAndFeel());
                    break;
            case 29:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceChallengerDeepLookAndFeel());
                    break;
            case 30:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceGreenMagicLookAndFeel());
                    break;
            case 31:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceMagmaLookAndFeel());
                    break;
            case 32:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceMangoLookAndFeel());
                    break;
            case 33:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceModerateLookAndFeel());
                    break;
            case 34:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceOfficeBlue2007LookAndFeel());
                    break;
            case 35:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceOfficeSilver2007LookAndFeel());
                    break;
            case 36:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel());
                    break;
            case 37:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceRavenGraphiteLookAndFeel());
                    break;
            case 38:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceRavenLookAndFeel());
                    break;
            case 39:SubstanceLookAndFeel.setSkin(new org.jvnet.substance.skin.LimberSkin());
                    break;
            case 40:SubstanceLookAndFeel.setSkin(new org.jvnet.substance.skin.FindingNemoSkin());
                    break;
            case 41:SubstanceLookAndFeel.setSkin(new org.jvnet.substance.skin.EbonyHighContrastSkin());
                    break;
            case 42:UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceSaharaLookAndFeel());
                    break;
        
        }
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        File archivo=new File("config/tema.dat");
        
        if(archivo.exists()){
            try{
                FileInputStream str=new FileInputStream(archivo);
                int temanum=str.read();
                str.close();
                cambiatema(temanum);
            }catch(Exception efg){}
            
        }else{
            try{
           File aux=new File("config");
           aux.mkdir();
           UIManager.setLookAndFeel(new org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel());
            }catch(Exception e){}
        }

        JP_AccesoUsuario panel = new JP_AccesoUsuario();
            javax.swing.JDialog jd = Utiles_Panel.creaVentanaDialogo( null, panel, "Ingreso de Usuario" );  //Se refiere a la ventana interna
            panel.setPadre( Utiles_Panel.TIPO_JDIALOG, jd ); //Indicamos que el contenedor es una ventana ineterna
        
     

        //new SistemaRRHH("luis", "luis", "");
        
        //funcioncliente.Main acceso=new funcioncliente.Main("http://192.168.23.6/","192.168.23.6","1234","rmi","c:/pruebaRMI/java.policy");
        
       
    }
    
}
